﻿using System;
using System.Collections.Generic;
using System.Data.Linq.Mapping;
using System.Linq;
using System.Text;
using Chowpoo.Sql;

namespace CourseSystem.Core.Entities
{
    [Table(Name = "TextResources")]
    public class TextResourcesInfo : ColumnKey, IDetach
    {
        public TextResourcesInfo()
        {
            Detach();
        }
        #region Model
        private string _title = "";
        private string _detail = "";
        private DateTime _uploaddate = DateTime.Now;
        private string _author = "";
        private int _uploaderid = 0;
        private byte _reviewtype = 0;
        private byte _type = 0;
        private int _uploadertype = 0;
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public string Title
        {
            set { _title = value; }
            get { return _title; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public string Detail
        {
            set { _detail = value; }
            get { return _detail; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public DateTime UploadDate
        {
            set { _uploaddate = value; }
            get { return _uploaddate; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public string Author
        {
            set { _author = value; }
            get { return _author; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public int UploaderId
        {
            set { _uploaderid = value; }
            get { return _uploaderid; }
        }
        /// <summary>
        /// 0未审核1通过2未通过
        /// </summary>
        [Column]
        public byte ReviewType
        {
            set { _reviewtype = value; }
            get { return _reviewtype; }
        }
        /// <summary>
        /// 0全部1教师2学生3其他
        /// </summary>
        [Column]
        public byte Type
        {
            set { _type = value; }
            get { return _type; }
        }
        /// <summary>
        /// 1学生2教师
        /// </summary>
        [Column]
        public int UploaderType
        {
            set { _uploadertype = value; }
            get { return _uploadertype; }
        }

        [Column]
        public int Hits
        {
            set;
            get;
        }
        #endregion Model

        public void Detach()
        {

        }
    }
}
